<%--
  Created by IntelliJ IDEA.
  User: jiao
  Date: 2019/5/7
  Time: 10:58
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ page isELIgnored="false"%>
<html>
<head>
    <link rel="stylesheet" href="/resource/layui/css/layui.css">
    <link rel="stylesheet" href="/resource/css/global.css">
    <link rel="stylesheet" href="/resource/css/common.css">
</head>
<body style="margin-top: 0px">
<div class="fly-panel fly-panel-user" pad20>
    <div class="layui-tab layui-tab-brief" lay-filter="user">
        <ul class="layui-tab-title" id="LAY_mine">
            <li class="layui-this" lay-id="info">他的资料</li>
            <li lay-id="avatar">头像</li>
            <li lay-id="pass">密码</li>
            <li lay-id="integrate">积分</li>
        </ul>
        <!-- 基本修改 -->
        <div class="layui-tab-content" style="padding: 20px 0;">
            <div class="layui-form layui-form-pane layui-tab-item layui-show">
                <form>
                    <div class="layui-form-item">
                        <label for="L_userId" class="layui-form-label">他的ID</label>
                        <div class="layui-input-inline">
                            <input type="text" id="L_userId" name="userId" autocomplete="off" value="${user.userId }" class="layui-input" readonly>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label for="L_username" class="layui-form-label">昵称</label>
                        <div class="layui-input-inline">
                            <input type="text" id="L_username" name="username" required lay-verify="required" autocomplete="off" value="${user.userName }" class="layui-input" readonly>
                        </div>
                        <div class="layui-inline">
                            <div class="layui-input-inline" >
                                <c:if test="${user.sex==1 }"> <input type="radio" lay-filter="sexselect" name="sex" value="1" checked="checked" title="男" readonly></c:if>
                                <c:if test="${user.sex==0 }"><input type="radio" lay-filter="sexselect" name="sex" value="0" checked="checked" title="女" readonly></c:if>
                            </div>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label for="L_email" class="layui-form-label">邮箱</label>
                        <div class="layui-input-inline">
                            <input type="text" id="L_email" name="email" required lay-verify="email" autocomplete="off" value="${user.email }" class="layui-input" readonly>
                        </div>
                        <c:if test="${user.email!=null }"><div class="layui-form-mid layui-word-aux">邮箱已激活，如需变更了邮箱，请<a href="activate.html" style="font-size: 12px; color: #4f99cf;">重新验证邮箱</a>。</div></c:if>
                        <c:if test="${user.email==null }"><div class="layui-form-mid layui-word-aux">邮箱未绑定，请绑定邮箱，并<a href="activate.html" style="font-size: 12px; color: #4f99cf;">验证邮箱</a>。</div></c:if>
                    </div>
                    <div class="layui-form-item">
                        <label for="L_phone" class="layui-form-label">手机号</label>
                        <div class="layui-input-inline">
                            <input type="text" id="L_phone" name="phone" autocomplete="off" value="${user.phone }" class="layui-input" readonly>
                        </div>
                        <c:if test="${user.phone==null }"><div class="layui-form-mid layui-word-aux">请完善此信息</div></c:if>
                    </div>
                    <div class="layui-form-item">
                        <label for="L_realname" class="layui-form-label">真实姓名</label>
                        <div class="layui-input-inline">
                            <input type="text" id="L_realname" name="realname" autocomplete="off" value="${user.realName }" class="layui-input" readonly>
                        </div>
                        <c:if test="${user.realName==null }"><div class="layui-form-mid layui-word-aux">未完善此信息</div></c:if>
                    </div>
                    <div class="layui-form-item">
                        <label for="L_identityNumber" class="layui-form-label">身份证号</label>
                        <div class="layui-input-inline">
                            <input type="text" id="L_identityNumber" name="identityNumber" autocomplete="off" value="${user.identityNumber }" class="layui-input" readonly>
                        </div>
                        <c:if test="${user.identityNumber ==null }"><div class="layui-form-mid layui-word-aux">未完善此信息</div></c:if>
                    </div>
                    <div class="layui-form-item">
                        <label for="L_birthday" class="layui-form-label">出生日期</label>
                        <div class="layui-input-inline">
                            <input type="text" id="L_birthday" name="birthday" autocomplete="off" value="${user.birthday }" class="layui-input" readonly>
                        </div>
                        <c:if test="${user.birthday ==null }"><div class="layui-form-mid layui-word-aux">未完善此信息</div></c:if>
                    </div>
                    <div class="layui-form-item">
                        <label for="L_city" class="layui-form-label">城市</label>
                        <div class="layui-input-inline">
                            <input type="text" id="L_city" name="city" autocomplete="off" value="${user.address }" class="layui-input" readonly>
                        </div>
                        <c:if test="${user.address ==null }"><div class="layui-form-mid layui-word-aux">未完善此信息</div></c:if>
                    </div>
                    <div class="layui-form-item">
                        <label for="L_joinDate" class="layui-form-label">加入日期</label>
                        <div class="layui-input-inline">
                            <input type="text" id="L_joinDate" name="joinDate" autocomplete="off" value="${user.joinDate }" class="layui-input" readonly>
                        </div>
                    </div>
                    <div class="layui-form-item layui-form-text">
                        <label for="L_sign" class="layui-form-label">签名</label>
                        <div class="layui-input-block">
                            <textarea  id="L_sign"  name="sign"  autocomplete="off" class="layui-textarea" style="height: 80px;">${user.introduce }</textarea>
                        </div>
                    </div>
                </form>
            </div>
            <!-- 头像上传模块 -->
            <div class="layui-form layui-form-pane layui-tab-item">
                <div class="layui-form-item">
                    <div class="avatar-add">
                        <c:if test="${!empty user.headSculpture }"><img src="${user.headSculpture }"></c:if>
                           <c:if test="${empty user.headSculpture }">  <div class="fly-none">没有相关数据</div></c:if>
                        <span class="loading"></span>
                    </div>
                </div>
            </div>
            <!-- 密码修改模块 -->
            <div class="layui-form layui-form-pane layui-tab-item">
                <form action="/user/repass" method="post">
                    <div class="layui-form-item">
                        <label for="L_nowpassword" class="layui-form-label">当前密码</label>
                        <div class="layui-input-inline">
                            <input type="text" id="L_nowpassword" name="nowpassword" required lay-verify="password" autocomplete="off" class="layui-input" value="${user.password }" readonly >
                        </div>
                    </div>
                </form>
            </div>

            <div class="layui-form layui-form-pane layui-tab-item">
                <div class="layui-form-item">
                    <label for="L_nowpassword" class="layui-form-label">他的积分</label>
                    <div class="layui-input-inline">
                        <input type="text" id="B_integration" name="integration" required  autocomplete="off" class="layui-input" value="${user.integration }" readonly >
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
</div>
<script type="text/javascript" src="/resource/js/common.js"></script>
<script src="/resource/js/jquery-3.4.0.min.js"></script>
<script src="/resource/layui/layui.js"></script>
<script>
    // 注意：导航 依赖 element 模块，否则无法进行功能性操作
    layui.use(['element','form'], function() {
        var element = layui.element;
        var form=layui.form;
        form.render('radio');
        element.render();
    });
</script>
</body>
</html>